const interfaces = require('os').networkInterfaces(); // 在开发环境中获取局域网中的本机iP地址
let util = require('./libs/util');
const path = require('path');
// var wechat = require('wechat');
//处理文本消息
// var handler = wechat(verifyInfo, wechat.text(wechatText));
let IP = '';
for (var devName in interfaces) {
    var iface = interfaces[devName];
    for (var i = 0; i < iface.length; i++) {
        var alias = iface[i];
        if (alias.family === 'IPv4' && alias.address !== '127.0.0.1' && !alias.internal) {
            IP = alias.address;
        }
    }
};
const CONF = {
    port: '8787',
    mysql: {},
    ip: IP,
    wConfig: process.env.NODE_ENV == 'production' ? {
        token: 'fa2f0a09212640719c937970efa88268', // your wechat token
        appID: 'wx13892ce43308c20d', // your wechat appid
        appsecret: '16abe69eb28c8a11a145ddc7b67d20c4'
    } : {
            token: 'manyusupboliman', // your wechat token
            appID: 'wx216eb31124fe4a25', // your wechat appid
            appsecret: '68dad71b23bee9bc6802ceeb02a9578c'
        },
    verifyInfo: process.env.NODE_ENV == 'production' ? { //验证信息
        token: 'fa2f0a09212640719c937970efa88268', // your wechat token
        appid: 'wx13892ce43308c20d', // your wechat appid
        appsecret: '16abe69eb28c8a11a145ddc7b67d20c4'
    } : { //验证信息
            token: 'manyusupboliman', // your wechat token
            appid: 'wx216eb31124fe4a25', // your wechat appid
            appsecret: '68dad71b23bee9bc6802ceeb02a9578c'
        },
    db: {
        host: '119.29.24.107',
        user: 'salon',
        password: '37ApyEnPz3G6ME4a',
        database: 'salon'
    },
    cConfig: {
        ip: '119.29.24.107',
        mch_id: 1529114461,
        mch_key: 'f2ec4b1440f6f15e1a6a5dca0bb704b3',
        token: 'fa2f0a09212640719c937970efa88268', //微信后台配置的token
        appid: 'wx13892ce43308c20d', //微信公众号的appid
        encodingAESKey: 'QXdvT3QeCOV5TeZaJSW23ggHow72cTq4u8Dm2AFMHCu' //微信公众号的encodingAESKey
    },

}
module.exports = CONF;